//
//  ShareTypeDataHeleper.m
//  Travel assistant
//
//  Created by lanou3g on 16/3/15.
//  Copyright © 2016年 旅游助手. All rights reserved.
//

#import "ShareTypeDataHeleper.h"
static ShareTypeDataHeleper *shareData = nil;
@implementation ShareTypeDataHeleper

+ (instancetype)shareTypeDataHeleper{
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        shareData = [[ShareTypeDataHeleper alloc] init];
        shareData.typeArray = [ShareTypeDataHeleper setTypeDataWithJourneyList];
    });
    return shareData;
}
+ (NSMutableArray *)setTypeDataWithJourneyList{
    NSArray *array = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"JourneyList" ofType:@"plist"]];
    NSMutableArray *muArray = [NSMutableArray array];
    for (NSDictionary *dict in array) {
        JourneyTypeModel *model = [[JourneyTypeModel alloc] init];
        [model setValuesForKeysWithDictionary:dict];
        [muArray addObject:model];
    }
    return muArray;
}

@end
